package com.HQCourse.vod.vod.controller;


import com.HQCourse.result.Result;
import com.HQCourse.vod.vod.service.VideoVisitorService;
import io.swagger.annotations.ApiOperation;
import jdk.nashorn.internal.objects.annotations.Optimistic;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * <p>
 * 视频来访者记录表 前端控制器
 * </p>
 *
 * @author zww
 * @since 2023-06-30
 */
@RestController
@RequestMapping("admin/vod/video-visitor")
//@CrossOrigin
public class VideoVisitorController {
    @Autowired
    private VideoVisitorService videoVisitorService;
    @ApiOperation("课程统计")
    @GetMapping("findCount/{courseId}/{startData}/{endTime}")
    public Result findCount(@PathVariable("courseId") Long courseId,
                            @PathVariable("startData") String startData,
                            @PathVariable("endTime") String endTime){
     Map<String,Object> map=videoVisitorService.findCount(courseId,startData,endTime);
     return Result.ok(map);
    }
}

